package com.example.logintokenredis.mapper;

import com.example.logintokenredis.entity.Auth;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface UserMapper {

    @Select("select * from auth where uid=#{uid}")
    public Auth getByUid(int uid);

    @Select("select * from auth where username=#{username}")
    public Auth getByUsername(String username);

    @Select("select uid from auth where username=#{username}")
    public int getUid(String username);
}
